package nckd.wnqjt.tmc.tda.plugin.form;

import kd.bos.form.events.AfterDoOperationEventArgs;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.bos.schedule.api.JobInfo;
import kd.bos.schedule.api.JobType;
import kd.sdk.plugin.Plugin;

/**
 * 标准单据列表插件
 */
public class FunddailyreportListPlugin extends AbstractListPlugin implements Plugin {


    @Override
    public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
        super.afterDoOperation(afterDoOperationEventArgs);
        String operateKey = afterDoOperationEventArgs.getOperateKey();
        if("nckd_update".equals(operateKey)){
            JobInfo job = new JobInfo();
            job.setAppId("bos");
            job.setJobType(JobType.BIZ);
            job.setName("FunddailyreportTaskJob");
//            job.setRunByUserId(20);
            job.setTaskClassname("nckd.wnqjt.tmc.tda.plugin.form.FunddailyreportTaskPlugin");
//            Map params = new HashMap<>();
//            params.put("p1", 20);
//            params.put("orgname", "金蝶集团");
//            job.setParams(params);
            kd.bos.schedule.executor.JobClient.dispatch(job);
        }
    }
}